package com.demo.bigdata

import org.apache.spark.{SparkConf, SparkContext}

object ReduceDemo {
  def main(args: Array[String]): Unit = {
    val conf = (new SparkConf).setMaster("local").setAppName("Demo");
    val sc = new SparkContext(conf)
    val lines = sc.parallelize(List("Hadoop","Hive","Hbase","Spark","Sqoop","Hive"))
    val result = lines.reduce(_+","+_)
    println(result)
  }
}
